package cn.starlightsoftware.sherly.service.tenant;

import cn.hutool.core.bean.BeanUtil;
import cn.starlightsoftware.sherly.controller.admin.tenant.vo.TenantSaveReqVO;
import cn.starlightsoftware.sherly.db.mapper.tenant.TenantMapper;
import cn.starlightsoftware.sherly.db.model.tenant.TenantDO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author 谷子毅
 */
@Service
public class TenantServiceImpl implements TenantService {

    @Resource
    private TenantMapper tenantMapper;

    @Override
    public void save(TenantSaveReqVO reqVO) {
        tenantMapper.insert(BeanUtil.copyProperties(reqVO, TenantDO.class));
        // TODO 需要增加建表逻辑
    }
}
